function dev = deviationMatrixlog10( ingConc, time )
    S = load('workParams.mat');

    sz = size(S.k);
    nsz = sz(2);
    
    res = zeros(nsz, 1);
    for i = 1:nsz
        res(i) = deviationByParam(S.pf, S.pdm, cell2mat(S.k(i)), ingConc, time);
    end
    
    fprintf('\n');

    dev = res;
    
    function logdif = deviationByParam( pf, pm, pname, ingConc, time )
    %pf - fixed params, pm - changing params, pname - name of varing param,
    %ingconc - concentration of inhibitor, time - time at which diffirentiation
    %occur

        pinfo = pm(pname);
        shift = min(10, (pinfo(3) - pinfo(2))/2 );       

        leftVal = pinfo(1) - shift;

        if abs(pinfo(1)) < 10*eps
            leftVal = 0;
        else
            if leftVal < -10*eps && pinfo(1) > 0
                shift = shift/10;
                leftVal = pinfo(1) - shift;
            end

            if leftVal < -10*eps && pinfo(1) > 0
                shift = shift/10;
                leftVal = pinfo(1) - shift;
            end
        end

        rightVal = pinfo(1) + shift;

        pStr2Double = defParamSet(pm);

        pStr2Double(pname) = leftVal;
        resParams = CalcResParams(pf, pStr2Double, ingConc);
        sol1_ = NNsysExact_ing0_p(10000, resParams);
        stconc1 = deval(sol1_, 10000);        
        sol1 = NNsysExact_ingNonzero_p(time, resParams, stconc1);

        pStr2Double(pname) = rightVal;
        resParams = CalcResParams(pf, pStr2Double, ingConc);
        sol2_ = NNsysExact_ing0_p(10000, resParams);
        stconc2 = deval(sol2_, 10000);
        sol2 = NNsysExact_ingNonzero_p(time, resParams, stconc2);

        logdif = deviationlog10(sol1,sol2,stconc1,stconc2,time) * ( 1 / (rightVal - leftVal) );
%         if ingConc == 1.5e+6
%             fx = deval(optsol15, time);
%         else
%             if ingConc == 7.5e+6
%                 fx = deval(optsol75, time);
%             end
%         end
%         logdif = dif / ( fx(1) * log(10) );
% 
%         fprintf('\n%s stepsize = %f,  logdif = %12.12f\n', pname, 2*shift, logdif);
%         disp(logdif);

        fprintf('\n%15s stepsize = %f,  logdev = %12.12f', pname, 2*shift, logdif);        
    end
end